package com.qg.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class User implements Serializable {

    private Long id; //编号
    private long fid;//上级用户的ID
    private String name; //用户姓名
    private String username; //用户登录名（工号）
    private String password; //密码

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    private String salt;//加密盐值
    private String money;//用户资金余额
    private String role_id;//用户对应的角色id
    private byte locked;//是否锁定
    private Date create_time;//创建用户的时间
    private String create_by;//创建用户的人
    private Date modify_time;//修改用户信息的时间
    private String modify_by;//修改用户信息的人
    private byte flag;//用户是否被删除（0.删除1.存在，未被删除）
    private String extend1;//扩展字段
    private String extend2;//扩展字段
    private String extend3;//扩展字段
    private List<Role> roles;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getFid() {
        return fid;
    }

    public void setFid(long fid) {
        this.fid = fid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getRole_id() {
        return role_id;
    }

    public void setRole_id(String role_id) {
        this.role_id = role_id;
    }

    public byte getLocked() {
        return locked;
    }

    public void setLocked(byte locked) {
        this.locked = locked;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public String getCreate_by() {
        return create_by;
    }

    public void setCreate_by(String create_by) {
        this.create_by = create_by;
    }

    public Date getModify_time() {
        return modify_time;
    }

    public void setModify_time(Date modify_time) {
        this.modify_time = modify_time;
    }

    public String getModify_by() {
        return modify_by;
    }

    public void setModify_by(String modify_by) {
        this.modify_by = modify_by;
    }

    public byte getFlag() {
        return flag;
    }

    public void setFlag(byte flag) {
        this.flag = flag;
    }

    public String getExtend1() {
        return extend1;
    }

    public void setExtend1(String extend1) {
        this.extend1 = extend1;
    }

    public String getExtend2() {
        return extend2;
    }

    public void setExtend2(String extend2) {
        this.extend2 = extend2;
    }

    public String getExtend3() {
        return extend3;
    }

    public void setExtend3(String extend3) {
        this.extend3 = extend3;
    }

    public User() { }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", fid=" + fid +
                ", name='" + name + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", salt='" + salt + '\'' +
                ", money='" + money + '\'' +
                ", role_id='" + role_id + '\'' +
                ", locked=" + locked +
                ", create_time=" + create_time +
                ", create_by='" + create_by + '\'' +
                ", modify_time=" + modify_time +
                ", modify_by='" + modify_by + '\'' +
                ", flag=" + flag +
                ", extend1='" + extend1 + '\'' +
                ", extend2='" + extend2 + '\'' +
                ", extend3='" + extend3 + '\'' +
                '}';
    }

}
